package com.huoyun.base.action;

import java.util.List;

import com.huoyun.base.bean.NodeInfo;
import com.huoyun.base.service.NodeInfoService;

public class NodeAction extends BaseAction {

	private NodeInfoService nodeInfoService;

	private List<NodeInfo> nodes;
	
	private int nodeId;

	public String getCitys() {
		nodes = nodeInfoService.getNodeInfosByParentId(nodeId);
		return SUCCESS;
	}

	public String getTowns() {
		nodes = nodeInfoService.getNodeInfosByParentId(nodeId);
		return SUCCESS;
	}

	public List<NodeInfo> getNodes() {
		return nodes;
	}

	public void setNodes(final List<NodeInfo> nodes) {
		this.nodes = nodes;
	}

	public void setNodeInfoService(final NodeInfoService nodeInfoService) {
		this.nodeInfoService = nodeInfoService;
	}

	public int getNodeId() {
		return nodeId;
	}

	public void setNodeId(final int nodeId) {
		this.nodeId = nodeId;
	}

	public List<NodeInfo> getAllNodeInfos() {
		return this.nodeInfoService.getAllNodeInfos();
	}
}
